

export default{
    install(Vue){
        Vue.filter('mySlice',function(value){
            return value.slice(0,4)
        })
        //全局自定义标签
        Vue.directive('fbind',{
            bind(element,binding){
                        console.log(element)
                        console.log(binding)
						element.value = binding.value
					},
					//指令所在元素被插入页面时
					inserted(element,binding){
						element.focus()
					},
					//指令所在的模板被重新解析时
					update(element,binding){
						element.value = binding.value
					}
        })
        Vue.mixin({
            data() {
            return {
                x:"1"
            }
        }
    })
    Vue.prototype.hello = ()=>{alert(1)}
    }
}